package com.colorful.insuranceproject.consts;

import com.lovely3x.common.requests.BaseURLConst;

/**
 * Created by lovely3x on 16/7/26.
 * <p>
 * 接口地址集中营
 */
public class URLConst extends BaseURLConst {

    //  App名称
    private static final String APP_NAME = "";

    //  请求域名
    private static final String GET_DOMAIN = "apibeta1.colorfulflorist.com";

    //   请求端口号
    private static final int GET_PORT = 9000;

    public static final String CUSTOMER_SERVICE_TELEPHONE_NUMBERS = "400-100-2287";

    /**
     * 三方登陆
     */
    public static final String THIRD_LOGIN_URL = "/app/users/thirdPartyLogin";

    /**
     * 登陆
     */
    public static final String LOGIN_URL = "/app/users/loginIn";

    /**
     * 获取用户信息
     */
    public static final String GET_USER_INFO = "/app/users/person";

    /**
     * 图片上传图片类型
     */
    private static final String UPLOAD_IMG_ACTION = "/app/users/uploadPic?dir=users&isTumb=1";

    /**
     * 注册新用户
     */
    public static final String REGISTER_NEW_USER_ULR = "/app/users/register";

    /**
     * 修改登陆密码
     */
    public static final String MODIFY_LOGIN_PASWWORD_URL = "/app/users/editPassword";

    /**
     * 获取注册时候的验证码
     */
    public static final String GET_REGISTER_VERIFY_CODE_URL = "/app/users/getPhoneCode";

    /**
     * 判断注册的验证码
     */
    public static final String JUDGE_VERIFY_CODE_BY_REGISTER_URL = "/app/users/mobileCodeVerify";

    /**
     * 获取忘记密码的 验证码
     */
    public static final String GET_FORGOT_PASSWORD_VERIFYCODE_URL = "/app/users/getVerfyUserPhoneCode";

    /**
     * 验证验证码 忘记密码
     */
    public static final String JUDGE_VERIFY_CODE_BY_FORGOT_URL = "/app/users/forgetPassMobileCodeVerify";

    /**
     * 忘记密码  设置新密码
     */
    public static final String FORGOT_PWD_UPDATE_NEW = "/app/users/resetPasswordByPhone";

    /**
     * 获取绑定手机的验证码
     */
    public static final String GET_BIND_PHONE_VERIFY_CODE_URL = "/app/users/getBindingPhoneCode";

    /**
     * 验证绑定手机的验证码
     */
    public static final String JUDGE_VERIFY_CODE_BY_BIND_PHONE_URL = "/app/users/bindingCodeVerfy";

    /**
     * 支付密码的验证码
     */
    public static final String GET_SET_PAY_PWD_VERIFY_CODE_URL = "";

    /**
     * 　设置支付密码 判断验证码
     */
    public static final String JUDGE_VERIFY_CODE_BY_GET_PAY_PWD_URL = "";

    /**
     * 修改支付密码
     */
    public static final String MODIFY_PAY_PASSWORD_URL = "/app/users/editpayPwd";

    /**
     * 获取忘记支付密码的验证码
     */
    public static final String GET_FORGOT_PWD_PHONE_VERIFY_CODE_URL = "/app/users/backPayCode";

    /**
     * 判断忘记支付密码的验证码
     */
    public static final String JUDGE_VERIFY_CODE_BY_FORGOT_PAY_PWD_URL = "/app/users/verifyBackPayCode";

    /**
     * 忘记支付密码  重置支付密码
     */
    public static final String FORGOT_PWD_SET_PAY_PWD_URL = "/app/users/resetBackPay";

    /**
     * 绑定手机设置支付密码
     */
    public static final String BIND_PHONE_SET_PWD_URL = "/app/users/bindingPhoneSetPwd";

    /**
     * 短信登陆获取验证码
     */
    public static final String GET_PHONE_LOGIN_SEND_SMS_URL = "/app/users/phoneLoginSendSms";

    /**
     * 推出登陆
     */
    public static final String LOGIN_OUT = "/app/users/logout";

    /**
     * 版本判断
     */
    public static final String VERSION_OF_THE_JUDGMENT = "/app/index/android_v";

    /**
     * 个人信息
     */
    public static final String GET_USER_INFO_URL = "/app/users/person";

    /**
     * 认证银行卡
     */
    public static final String AUTHENTICATION_BANK_CARD_URL_TWO = "/app/certification/cardAuth";

    /**
     * 添加银行卡
     */
    public static final String ADD_BANK_CARD_URL = "/app/users/bindCard";

    /**
     * 收货地址
     */
    public static final String GET_DELIVER_INFO_URL = "/app/users/userAddressList";

    /**
     * 编辑或者添加收货地址
     */
    public static final String ADD_NEW_SHOPPING_ADDRESS = "/app/users/userAddress";

    /**
     * 上传记录
     */
    public static final String GET_UPLOAD_RECORD_URL = "/app/insurance/insuranceUploadList";

    /**
     * 理赔进度
     */
    public static final String GET_CLAIMS_PROGRESS_URL = "/app/insurance/insuranceList";

    /**
     * 交易记录
     */
    public static final String GET_TRANSACTION_RECORD_URL = "/app/insurance/orderList";

    /**
     * 获取银行卡列表
     */
    public static final String GET_BANK_CARD_LIST_URL = "/app/users/bankCardList";

    /**
     * 理赔详情
     */
    public static final String GET_CLAIMS_DETAILS_URL = "/app/insurance/insuranceDetail";

    /**
     * 绑定银行的认证
     */
    public static final String BIND_BANK_CARD_AUTHENTICATION = "/app/certification/bindAuth";

    /**
     * 移除银行卡
     */
    public static final String DELETE_BANK_CARD = "/app/users/removeCards";

    /**
     * 移除收货地址
     */
    public static final String DELETE_DELIVERY_URL = "/app/users/deleteAddress";

    /**
     * 设置默认收货地址
     */
    public static final String SET_DEFAULT_DELIVERY_URL = "/app/users/defaultAddress";

    /**
     * 忘记密码的发送短信接
     */
    public static final String GET_FORGOT_LOGIN_SEND_SMS_URL = "/app/users/getVerfyUserPhoneCode";

    /**
     * 忘记密码  设置新密码
     */
    public static final String FORGOT_PWD_SET_PWD_URL = "/app/users/forgetPassword";

    /**
     * 获取药店地址列表
     */
    public static final String GET_DRUG_ADDRESS_URL = "/app/insurance/pharmacyAddress";

    /**
     * 上传票据第二步
     */
    public static final String PAPER_UPLOAD_URL = "/app/insurance/paperUpload";

    /**
     * 绑定支付密码 --》判断验证码
     */
    public static final String BIND_PAY_PWD_URL = "/app/users/getVerfyUserPhoneCode";

    /**
     * 设置支付密码
     */
    public static final String SET_PAY_PWD_URL = "/app/users/renewPaypwd";

    /**
     * 判断验证码
     */
    public static final String BIND_PAY_PWD_JUDGE_URL = "/app/users/vailPaypwd";

    /**
     * 初始化支付密码
     */
    public static final String INIT_PAY_PWD_URL = "/app/users/setPaypwd";

    /**
     * 理赔撤销接口
     */
    public static final String CANCEL_CLAIMS_URL = "/app/insurance/cancel";

    /**
     * 实名认证按钮
     */
    public static final String REAL_NAME_AUTHENTICATION = "/app/certification/name";

    /**
     * 获取支付的二维码付款码
     */
    public static final String GET_PAY_QR_CODE_URL = "/app/insurance/createQrCode";

    /**
     * 退款金额的设置
     */
    public static final String SET_RETURN_MONEY_URL = "/app/insurance/refundQrCode";

    /**
     * 历史上传的详情
     */
    public static final String GET_UPLOAD_DETAILS_URL = "/app/insurance/supply";

    /**
     * 编辑或者补充历史上传
     */
    public static final String SUPPLEMENT_UPLOAD_URL = "/app/insurance/edit";

    /**
     * 实名认证
     */
    public static final String TEXT_TRANSPORT = "/app/test/send";

    /**
     * 首页数据
     */
    public static final String GET_HOME_PAGE_DATA = "/app/insurance/index";

    /**
     * 资讯页面的数据
     */
    public static final String GET_CONSULT_PAGE_DATA = "/app/insurance/articles";

    /**
     * 资讯详情
     */
    public static final String GET_CONSULT_DETAILS = "/app/insurance/articleDetail";

    /**
     * 获取资讯页面的banner
     */
    public static final String GET_CONSULT_BANNER = "/app/insurance/articleBanners";

    /**
     * 获取服务页面的banner
     */
    public static final String GET_SERVER_BANNER = "/app/insurance/banners";

    /**
     * 获取体检的接口数据
     */
    public static final String GET_PHYSICAL_EXAMINATION_APPOINTMENT_URL = "/app/insurance/reserves";

    /**
     * 体检详情
     */
    public static final String GET_PHY_DETAILS_URL = "/app/insurance/reserveDetail";

    /**
     * 获取城市列表
     */
    public static final String GET_CITY_LIST_URL = "/app/insurance/districts";

    /**
     * 获取当前城市
     */
    public static final String CURRENT_ADDRESS_URL = "/app/insurance/currentAddr";

    /**
     * 二维码页面推送接口
     */
    public static final String ABOUT_QR_PAGE_CONST = "/system/reciveMsgAction";

    /**
     * 生成新的订单值  在本地做操作。
     */
    public static final String GENERATE_WEB_ORDER_URL = "https://admin.colorfulflorist.com/test/wechat/orders/queryOrderInfo.html?";

    /**
     * 微博的回掉地址
     */
    public static String WE_CHAT_CALL_BACK_URL = "https://api.weibo.com/oauth2/default.html";

    /**
     * 核对遇到问题
     */
    public static String CHECKING_ENCOUNTER_QUESTION = "https://www.colorfulflorist.com/insurance/view/checkPro.html";

    /**
     * 理赔查询规范
     */
    public static String CLAIM_SETTLEMENT_AGREEMENT = "https://www.colorfulflorist.com/insurance/view/claimsetPro.html";

    /**
     * 登陆遇到问题
     */
    public static String LOGIN_ENCOUNTER_QUESTION = "https://www.colorfulflorist.com/insurance/view/loginPro.html";

    /**
     * 票据上传遇到问题
     */
    public static String UPLOAD_INVOICE_ENCOUNTER_QUESTION = "https://www.colorfulflorist.com/insurance/view/uploadPro.html";

    /**
     * 理赔及查询服务协议
     */
    public static String CLAIM_AND_SEARCH_SERVER_AGREEMENT = "https://www.colorfulflorist.com/app-h5/view/healthyprotocol.html";

    /**
     * 理赔及查询服务协议
     */
    public static String CLAIM_SET_HAVE_QUEAS = "https://www.colorfulflorist.com/app-h5/view/healthyprotocol.html";

    /**
     * 判断订单是否支付成功
     */
    public static final String MAKE_SURE_THE_ORDER_PAYMENT_SUCCESSFUL = "https://www.api1.colorfulflorist.com/app/orders/paySuccess?";

    /**
     * 获取支付宝支付的数据
     */
    public static final String GET_ALI_PAY_DATA = "https://api1.colorfulflorist.com/app/payments/aliPay?";

    /**
     * 获取微信支付的调用参数
     */
    public static final String GET_WE_CHAT_PAY_DATA = "https://api1.colorfulflorist.com/app/payments/weixinPay?";

    /**
     * 可康安支付
     */
    public static final String PAY_OF_KEKANGAN_URL = "https://api1.colorfulflorist.com/app/orders/kekanganPay";

    static {
//        putAction(PersonalRequests.KEY_GET_USER_BY_PHONES, GET_USER_INFO_BY_PHONE_ACTION);
    }

    @Override
    public String getApplicationName() {
        return APP_NAME;
    }

    @Override
    public String getDomain() {
        return GET_DOMAIN;
    }

    @Override
    public int getPort() {
        return GET_PORT;
    }

    //   接口地址拼接
    @Override
    public String concatAction(String action) {
        String base = getBaseURL();
        if (action.startsWith("/")) {
            if (base.endsWith("/")) {
                String subString = action.substring(1, action.length());
                return base + subString;
            } else {
                return base + action;
            }
        } else {
            if (base.endsWith("/")) {
                return base + action;
            } else {
                return base + "/" + action;
            }
        }
    }

    //   图片上传接口处理
    @Override
    public String getImageUploadUrl() {
        return UPLOAD_IMG_ACTION;
    }

    //   音频上传接口处理
    @Override
    public String getAudioUploadUrl() {
        return null;
    }
}

